<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>My JSP 'news.jsp' starting page</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
		<script type="text/javascript"> 
   var t = 1; 
   function addFile() 
   { 
    var parent = document.getElementById("more"); 

    var br = document.createElement("br"); 
    var input = document.createElement("input"); 
    var button = document.createElement("input"); 

    input.type = "file"; 
    input.name = "files"; 
    input.size = "30"; 
    button.type = "button"; 
    button.value = "删除"; 

    button.onclick = function() 
    { 
     parent.removeChild(br); 
     parent.removeChild(input); 
     parent.removeChild(button); 
    
    }; 

    parent.appendChild(br); 
    parent.appendChild(input); 
    parent.appendChild(button); 
   } 
</script>

	</head>

	<body>
		<form action="news.do?method=add" method="post"
			enctype="multipart/form-data">
			<input type="hidden" name="id" value="${news.id }">
			<table width="90%" border="0" align="left" cellpadding="0"
				cellspacing="1" class="newTable">
				<tr>
					<td class="newTd">
						新闻标题
					</td>
					<td class="newTd">
						<input type="text" name="title" size="30">
					</td>
				</tr>
				<tr>
					<td class="newTd">
						新闻副标题
					</td>
					<td class="newTd">
						<input type="text" name="subTitle" size="30">
					</td>
				</tr>
				<tr>
					<td class="newTd">
						新闻内容
					</td>
					<td class="newTd">
						<textarea class="ckeditor" name="content"></textarea>
					</td>
				</tr>
				<tr>
					<td class="newTd">
						新闻图片
					</td>
					<td class="newTd" id="more">
						<input type="file" name="files" size="30">
						<input type="button" onclick="addFile();" value="增加">
					</td>
				</tr>
				<tr>
					<td class="newTd">
						新闻所属板块
					</td>
					<td class="newTd">
						<select id="modelSelect" name="modelId">
						</select>
					</td>
				</tr>
				<tr>
					<td align="center" colspan="2">
						<input type="submit" value="保存">
						&nbsp;&nbsp;&nbsp;&nbsp;
						<input type="reset" value="重置">
					</td>
				</tr>
			</table>
		</form>


	</body>
</html>
